package com.zs.diveinspringboot.context

import org.springframework.context.ApplicationContextInitializer
import org.springframework.context.ConfigurableApplicationContext
import org.springframework.core.Ordered

/**
 *
 * @description
 * @author madison
 * @date 2021/6/5 16:57
 *
 */
class AfterHelloWorldApplicationContextInitializer<C : ConfigurableApplicationContext> :
    ApplicationContextInitializer<C>, Ordered {
    override fun initialize(applicationContext: C) {
        println("After application.id = ${applicationContext.id}")
    }

    override fun getOrder(): Int {
        return Ordered.LOWEST_PRECEDENCE
    }
}